package com.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.common.enumbean.OrderStatus;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@NoArgsConstructor()
@TableName("orders")
public class Order {
//
//CREATE TABLE orders (
//            id VARCHAR(22) PRIMARY KEY COMMENT '订单ID',
//    customer_id INT NOT NULL COMMENT '客户ID',
//    user_id INT NOT NULL COMMENT '用户ID',
//    order_time DATETIME NOT NULL COMMENT '下单时间',
//    total_amount DECIMAL(12,2) NOT NULL COMMENT '订单总额',
//    order_status ENUM('待付款','已成交','已取消') DEFAULT '待付款' COMMENT '订单状态',
//    deal_time DATETIME COMMENT '成交时间',
//    contract_filename VARCHAR(255) COMMENT '文件名称',
//    contract_file VARCHAR(255) COMMENT '文件路径',
//    contract_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
//    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@TableId(type= IdType.AUTO)
    private String id;
    private Integer customer_id;
    private Integer user_id;
    private LocalDateTime order_time;
    private BigDecimal total_amount;
    private OrderStatus order_status;
    private LocalDateTime deal_time;
    private String contract_filename;
    private String contract_file;
    private LocalDateTime contract_at;
    private LocalDateTime updated_at;
}
